package com.zzh.memberServiceImpl.impl;

import com.netflix.ribbon.proxy.annotation.Hystrix;
import com.zzh.api.model.UserEntity;
import com.zzh.api.service.MemberService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class MemberServiceImpl implements MemberService {

    @RequestMapping("/getMember")
    public UserEntity getMember(@RequestParam("name") String name) {
        UserEntity userEntity = new UserEntity();
        userEntity.setName("zzh");
        userEntity.setAge(25);
        try {
            Thread.sleep(20000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return userEntity;
    }

    public UserEntity  test(){
        return new UserEntity();
    }
}
